package com.lsl.abstract_factory.listfactory;

import com.lsl.abstract_factory.factory.Factory;
import com.lsl.abstract_factory.factory.Link;
import com.lsl.abstract_factory.factory.Page;
import com.lsl.abstract_factory.factory.Tray;

/**
 * ListFactory类实现了Factory类的 createLink方法、createTray方法以及createPage方法
 *
 * @author Zed
 * @description
 * @date 2022/11/27 18:24
 */
public class ListFactory extends Factory {
    @Override
    public Link createLink(String caption, String url) {
        return new ListLink(caption, url);
    }

    @Override
    public Tray createTray(String caption) {
        return new ListTray(caption);
    }

    @Override
    public Page createPage(String title, String authorName) {
        return new ListPage(title, authorName);
    }
}
